package cn.iocoder.yudao.module.demo.dal.mysql.promotion;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.demo.dal.dataobject.promotion.PromotionDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 促销 Mapper
 *
 * @author 徐煜东
 */
@Mapper
public interface PromotionMapper extends BaseMapperX<PromotionDO> {

//    default PageResult<PromotionDO> selectPage(PromotionPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<PromotionDO>()
//                .eqIfPresent(PromotionDO::getProductId, reqVO.getProductId())
//                .eqIfPresent(PromotionDO::getPromoTitle, reqVO.getPromoTitle())
//                .eqIfPresent(PromotionDO::getPromoDescription, reqVO.getPromoDescription())
//                .eqIfPresent(PromotionDO::getIsActive, reqVO.getIsActive())
//                .betweenIfPresent(PromotionDO::getCreateTime, reqVO.getCreateTime())
//                .orderByDesc(PromotionDO::getId));
//    }

}
